package com.swn.num;

public class Number {
    private int n1;
    private int n2;
    //此为构造方法，赋予n1，n2初始值。
    public Number(int n1, int n2) {
        this.n1 = n1;
        this.n2 = n2;
    }
    //加减乘除的成员方法
    public void addition(){
        p(n1+n2);
    }
    public void subtration(){
        p(n1-n2);
    }
    public void multiplication(){
        p(n1*n2);
    }
    public void division(){
        p(n1/n2);
    }
    public void p(int n){
        System.out.println(n);
    }

}
